﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <meta charset="utf-8" />
    <script src="scripts/jquery-3.2.1.js" type="text/javascript"></script>
    <script>
        $('#checkAll').click(function () {
            $('[name="items"]').prop("checked", this.checked);
        });
    </script>
</head>
<body>
    <form action="#">
        你爱好的游戏是?
        <div>
            <input type="checkbox" id="checkAll" />全选/全部取消
        </div>

        <input type="checkbox" name="items" value="王者荣耀">王者荣耀
        <input type="checkbox" name="items" value="绝地求生大逃杀">绝地求生大逃杀
        <input type="checkbox" name="items" value="开心消消乐">开心消消乐
        <input type="checkbox" name="items" value="斗地主">斗地主
        <div>
            <input type="button" id="send" value="提交" />
        </div>

    </form>
</body>
</html>
